@import "../../base/fn";
//$weuiGridBorderColor:#D9D9D9;
//$weuiGridFontSize: 15px;
//$weuiGridIconSize: 28px;
//$weuiGridColumnCount: 3;
//
//$weuiBgColorActive: #ECECEC;
//$weuiTextColorTitle: #333;


//
//.setTopLine($c: #C7C7C7) {
//  content: " ";
//  position: absolute;
//  left: 0;
//  top: 0;
//  right: 0;
//  height: 1px;
//  border-top: 1px solid $c;
//  color: $c;
//  transform-origin: 0 0;
//  transform: scaleY(0.5);
//}
//
//.setBottomLine($c: #C7C7C7) {
//  content: " ";
//  position: absolute;
//  left: 0;
//  bottom: 0;
//  right: 0;
//  height: 1px;
//  border-bottom: 1px solid @c;
//  color: @c;
//  transform-origin: 0 100%;
//  transform: scaleY(0.5);
//}
//
//.setLeftLine(@c: #C7C7C7) {
//  content: " ";
//  position: absolute;
//  left: 0;
//  top: 0;
//  width: 1px;
//  bottom: 0;
//  border-left: 1px solid @c;
//  color: @c;
//  transform-origin: 0 0;
//  transform: scaleX(0.5);
//}
//
//.setRightLine(@c: #C7C7C7) {
//  content: " ";
//  position: absolute;
//  right: 0;
//  top: 0;
//  width: 1px;
//  bottom: 0;
//  border-right: 1px solid @c;
//  color: @c;
//  transform-origin: 100% 0;
//  transform: scaleX(0.5);
//}
//



.weui-grids {
    position: relative;
    overflow: hidden;
    margin-bottom:30px;

    &:before {
        //.setTopLine($weuiGridBorderColor);
      content: " ";
      position: absolute;
      left: 0;
      top: 0;
      right: 0;
      height: 1px;
      border-top: 1px solid #D9D9D9;
      color: #D9D9D9;
      transform-origin: 0 0;
      transform: scaleY(0.5);
    }
    &:after {
        //.setLeftLine($weuiGridBorderColor);
      //content: " ";
      //position: absolute;
      //left: 0;
      //top: 0;
      //width: 1px;
      //bottom: 0;
      //border-left: 1px solid red;
      //color: #D9D9D9;
      //transform-origin: 0 0;
      //transform: scaleX(0.5);
      content: " ";
      position: absolute;
      left: 0;
      bottom: 0;
      right: 0;
      height: 1px;
      border-bottom: 1px solid #D9D9D9;
      color: #D9D9D9;
      transform-origin: 0 100%;
      transform: scaleY(0.5);
    }
}

.weui-grid {
    position: relative;
    float: left;
    padding: 20px 10px;
    width: 100% / $weuiGridColumnCount;
    box-sizing: border-box;

    &:before {
        //.setRightLine($weuiGridBorderColor);
      content: " ";
      position: absolute;
      right: 0;
      top: 0;
      width: 1px;
      bottom: 0;
      border-right: 1px solid #D9D9D9;
      color: #D9D9D9;
      transform-origin: 100% 0;
      transform: scaleX(0.5);
    }
    &:after {
        //.setBottomLine($weuiGridBorderColor);
      content: " ";
      position: absolute;
      left: 0;
      bottom: 0;
      right: 0;
      height: 1px;
      border-bottom: 1px solid #D9D9D9;
      color: #D9D9D9;
      transform-origin: 0 100%;
      transform: scaleY(0.5);
    }

    &:active {
        background-color: $weuiBgColorActive;
    }
}

.weui-grid__icon {
    width: $weuiGridIconSize;
    height: $weuiGridIconSize;
    margin: 0 auto;

    img {
        display: block;
        width: 100%;
        height: 100%;
    }

    & + .weui-grid__label{
        margin-top: 5px;
    }
}

.weui-grid__label {
    display: block;
    text-align: center;
    color: $weuiTextColorTitle;
    font-size: $weuiGridFontSize;
    padding-top: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.weui-grids.vux-grid-no-lr-borders {
  &:after {
    display: none;
  }
}

.weui-grid.vux-grid-item-no-right-border{
  &:before {
    display: none;
  }
}
// grid-item 去除底部border
.weui-grid.vux-grid-item-no-bottom-border{
  &:after {
    display: none;
  }
}
